home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * Dialog.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
-
- if (!IS_isModuleInitialized("IS.NOF.UI.Dialog"))
- {
-
- /****h* NOF_JavaScript_Library/NOF.UI.Dialog
- *
- * NAME
- * NOF.UI.Dialog
- *
- * DESCRIPTION
- *
- * External dependencies: NOF.HTML.EditorWindow, NOF.WindowEvent
- ****/
-
- /**
- * Constructor
- **/
- function NOF_UI_Dialog (_editedElem, _document, _name) {
- this.__proto__ = NOF_UI_Dialog.prototype;
- this.SUPER ( _editedElem, _document, _name );
- }
- NOF_UI_Dialog.inherits( NOF.HTML.EditorWindow )
- {
-
- var method = NOF_UI_Dialog.prototype;
-
- method.onLoad = function () {
- }
-
- method.onUnload = function () {
- this.onClose(new NOF.WindowEvent( NOF.WindowEvent.DIALOG_CLOSED, this));
- this.setEditedElement( null );
- this.release();
- }
-
- method.onOk = function () {
- this.notifyListeners( new NOF.WindowEvent(NOF.WindowEvent.DIALOG_OK, this) );
- this.close();
- }
- method.onCancel = function () {
- this.notifyListeners( new NOF.WindowEvent(NOF.WindowEvent.DIALOG_CANCEL, this) );
- this.close();
- }
-
- method.close = function (){
- this.doc.getRawDoc().parentWindow.close();
- }
-
- method.super_getResourceProperty = method.getResourceProperty;
- method.getResourceProperty = function ( key ) {
- var resourceProperty = this.super_getResourceProperty( this.getName() + "." + key );
- if ( resourceProperty != null && resourceProperty.length > 0 ) {
- return resourceProperty;
- }
- else {
- return this.super_getResourceProperty ( key );
- }
- }
- }
-
- NOF.UI.__proto__.Dialog = NOF_UI_Dialog;
- }
-